package com.brewdroid.model;

import com.brewdroid.enumerators.HopClass;
import com.brewdroid.enumerators.HopFormat;

public class Hop implements Ingredient{
	
	private IngredientImpl ingredient;
	private float alphaAcid;
	private float betaAcid;
	private HopClass classification;
	private HopFormat format;
	
	public Hop(String name, String description){
		ingredient = new IngredientImpl(name, description);
	}
	
	public Hop() {
		ingredient = new IngredientImpl();
		// TODO Auto-generated constructor stub
	}

	public void setAlphaAcid(float alphaAcid){
		this.alphaAcid = alphaAcid;
	}
	
	public float getAlphaAcid(){
		return alphaAcid;
	}
	
	public void setBetaAcid(float betaAcid){
		this.betaAcid = betaAcid;
	}
	
	public float getBetaAcid(){
		return betaAcid;
	}
	
	public void setHopClass(HopClass classification){
		this.classification = classification;
	}
	
	public HopClass getClassification(){
		return classification;
	}
	
	public void setFormat(HopFormat format){
		this.format = format;
	}
	
	public HopFormat getFormat(){
		return format;
	}

	@Override
	public String getName() {
		return ingredient.getName();
	}

	@Override
	public String getDescription() {
		return ingredient.getDescription();
	}
	
	@Override
	public void setName(String name)
	{
		ingredient.setName(name);
	}
	
	@Override
	public void setDescription(String description)
	{
		ingredient.setDescription(description);
	}
	

	@Override
	public String toString()
	{
		StringBuilder sb = new StringBuilder();
		sb.append("Name: "+ingredient.getName()+"\n");
		sb.append("Description: "+ingredient.getDescription() + "\n");
		sb.append("AlphaAcid: "+Float.toString(alphaAcid)+"\n");
		sb.append("Classification: "+classification.toString()+"\n");
		sb.append("Format: "+format.toString()+"\n");
		
		return sb.toString();
	}
	
}
